import { SlabThicknessSlider } from '@ohif/ui';
import { TOOLBAR_BUTTON_TYPES } from '@ohif/core';
import DEFAULT_CONTEXT from './defaultContext';

const definitions = [
  {
    id: 'CT-Bone',
    label: 'CT-Bone',
    icon: 'wl-head',
    className: 'hideOnPhone',
    type: TOOLBAR_BUTTON_TYPES.SET_TOOL_ACTIVE,
    commandName: 'setCLUT',
    commandOptions: {
      presetId: 'vtkMRMLVolumePropertyNode3'
    },
  },
  {
    id: 'CT-Cardiac',
    label: 'CT-Cardiac',
    icon: 'cardiac',
    className: 'hideOnPhone',
    type: TOOLBAR_BUTTON_TYPES.SET_TOOL_ACTIVE,
    commandName: 'setCLUT',
    commandOptions: {
      presetId: 'vtkMRMLVolumePropertyNode5'
    },
  },
  {
    id: 'CT-Chest',
    label: 'CT-Chest',
    icon: 'chest',
    className: 'hideOnPhone',
    type: TOOLBAR_BUTTON_TYPES.SET_TOOL_ACTIVE,
    commandName: 'setCLUT',
    commandOptions: {
      presetId: 'vtkMRMLVolumePropertyNode8'
    },
  },
  {
    id: 'CT-Coronary',
    label: 'CT-Coronary',
    icon: 'coronary',
    className: 'hideOnPhone',
    type: TOOLBAR_BUTTON_TYPES.SET_TOOL_ACTIVE,
    commandName: 'setCLUT',
    commandOptions: {
      presetId: 'vtkMRMLVolumePropertyNode10'
    },
  },
  {
    id: 'CT-Liver',
    label: 'CT-Liver',
    icon: 'liver',
    className: 'hideOnPhone',
    type: TOOLBAR_BUTTON_TYPES.SET_TOOL_ACTIVE,
    commandName: 'setCLUT',
    commandOptions: {
      presetId: 'vtkMRMLVolumePropertyNode15'
    },
  },
  {
    id: 'CT-Lung',
    label: 'CT-Lung',
    icon: 'lung',
    className: 'hideOnPhone',
    type: TOOLBAR_BUTTON_TYPES.SET_TOOL_ACTIVE,
    commandName: 'setCLUT',
    commandOptions: {
      presetId: 'vtkMRMLVolumePropertyNode16'
    },
  },
  {
    id: 'VTK-VR',
    label: 'VR',
    icon: 'brain',
    className: 'hideOnDesktop',
    buttons: [
      {
        id: 'CT-Bone',
        label: 'CT-Bone',
        icon: 'brain',
        //
        type: TOOLBAR_BUTTON_TYPES.SET_TOOL_ACTIVE,
        commandName: 'setCLUT',
        commandOptions: {
          presetId: 'vtkMRMLVolumePropertyNode3'
        },
      },
      {
        id: 'CT-Cardiac',
        label: 'CT-Cardiac',
        icon: 'cardiac',
        //
        type: TOOLBAR_BUTTON_TYPES.SET_TOOL_ACTIVE,
        commandName: 'setCLUT',
        commandOptions: {
          presetId: 'vtkMRMLVolumePropertyNode5'
        },
      },
      {
        id: 'CT-Chest',
        label: 'CT-Chest',
        icon: 'chest',
        //
        type: TOOLBAR_BUTTON_TYPES.SET_TOOL_ACTIVE,
        commandName: 'setCLUT',
        commandOptions: {
          presetId: 'vtkMRMLVolumePropertyNode8'
        },
      },
      {
        id: 'CT-Coronary',
        label: 'CT-Coronary',
        icon: 'coronary',
        //
        type: TOOLBAR_BUTTON_TYPES.SET_TOOL_ACTIVE,
        commandName: 'setCLUT',
        commandOptions: {
          presetId: 'vtkMRMLVolumePropertyNode10'
        },
      },
      {
        id: 'CT-Liver',
        label: 'CT-Liver',
        icon: 'liver',
        //
        type: TOOLBAR_BUTTON_TYPES.SET_TOOL_ACTIVE,
        commandName: 'setCLUT',
        commandOptions: {
          presetId: 'vtkMRMLVolumePropertyNode15'
        },
      },
      {
        id: 'CT-Lung',
        label: 'CT-Lung',
        icon: 'lung',
        //
        type: TOOLBAR_BUTTON_TYPES.SET_TOOL_ACTIVE,
        commandName: 'setCLUT',
        commandOptions: {
          presetId: 'vtkMRMLVolumePropertyNode16'
        },
      },
      {
        id: 'ExitMPR',
        label: 'Exit',
        icon: 'exit',
        //
        type: TOOLBAR_BUTTON_TYPES.COMMAND,
        commandName: 'exitVtkVR',
      },
    ]
  },

  {
    id: 'VR',
    label: 'VR',
    icon: 'blend-com',
    className: 'hideOnPhone',
    type: TOOLBAR_BUTTON_TYPES.SET_TOOL_ACTIVE,
    commandName: 'setVRBlendModeToComposite',
    options: {
      isVtkMpr: true,
      showSlabThickness: false,
    },
  },
  {
    id: 'VRMaxIP',
    label: 'MaxIP',
    icon: 'blend-max',
    className: 'hideOnPhone',
    type: TOOLBAR_BUTTON_TYPES.SET_TOOL_ACTIVE,
    commandName: 'setVRBlendModeToMaximumIntensity',
    options: {
      isVtkMpr: true,
      showSlabThickness: true,
    },
  },
  {
    id: 'VRMinIP',
    label: 'MinIP',
    icon: 'blend-min',
    className: 'hideOnPhone',
    type: TOOLBAR_BUTTON_TYPES.SET_TOOL_ACTIVE,
    commandName: 'setVRBlendModeToMinimumIntensity',
    options: {
      isVtkMpr: true,
      showSlabThickness: true,
    },
  },
  {
    id: 'VRAvgIP',
    label: 'AvgIP',
    icon: 'blend-avg',
    className: 'hideOnPhone',
    type: TOOLBAR_BUTTON_TYPES.SET_TOOL_ACTIVE,
    commandName: 'setVRBlendModeToAverageIntensity',
    options: {
      isVtkMpr: true,
      showSlabThickness: true,
    },
  },
  {
    id: 'BlendMode',
    label: 'Blend Mode',
    icon: 'blend-com',
    className: 'hideOnDesktop',
    buttons: [
      {
        id: 'VR',
        label: 'VR',
        icon: 'blend-com',
        //
        type: TOOLBAR_BUTTON_TYPES.SET_TOOL_ACTIVE,
        commandName: 'setVRBlendModeToComposite',
        options: {
          isVtkMpr: true,
          showSlabThickness: false,
        },
      },
      {
        id: 'VRMaxIP',
        label: 'MaxIP',
        icon: 'blend-max',
        //
        type: TOOLBAR_BUTTON_TYPES.SET_TOOL_ACTIVE,
        commandName: 'setVRBlendModeToMaximumIntensity',
        options: {
          isVtkMpr: true,
          showSlabThickness: true,
        },
      },
      {
        id: 'VRMinIP',
        label: 'MinIP',
        icon: 'blend-min',
        //
        type: TOOLBAR_BUTTON_TYPES.SET_TOOL_ACTIVE,
        commandName: 'setVRBlendModeToMinimumIntensity',
        options: {
          isVtkMpr: true,
          showSlabThickness: true,
        },
      },
      {
        id: 'VRAvgIP',
        label: 'AvgIP',
        icon: 'blend-avg',
        //
        type: TOOLBAR_BUTTON_TYPES.SET_TOOL_ACTIVE,
        commandName: 'setVRBlendModeToAverageIntensity',
        options: {
          isVtkMpr: true,
          showSlabThickness: true,
        },
      },
    ]
  },
  {
    id: 'changeVRSlabThickness',
    label: 'Slab Thickness',
    CustomComponent: SlabThicknessSlider,
    commandName: 'setVRSlabThickness',
    commandOptions: {},
  },
  {
    id: 'ExitMPR',
    label: 'Exit',
    icon: 'exit',
    // className: 'hideOnPhone',
    type: TOOLBAR_BUTTON_TYPES.COMMAND,
    commandName: 'exitVtkVR',
  },
];

export default {
  definitions,
  defaultContext: DEFAULT_CONTEXT,
};
